package com.css.dzj.dzjdzqs.modules.supervisionrecord.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 擅自公告监测记录表
 *
 * @author xgdou
 * @time 20200318
 */
@Entity
@Table(name = "SUPERVISIONRECORD", schema = "DZJDZQS", catalog = "")
public class SupervisionEntity {
    private String id;
    /**
     * 标题
     **/
    private String title;
    /**
     * 创建者
     **/
    private String createUser;
    /**
     * 创建者单位
     **/
    private String createUserUnit;
    /**
     * 状态 0暂存, 1已提交
     **/
    private String status;
    /**
     * 创建时间
     **/
    private Date createTime;
    /**
     * 监管对象名称
     **/
    private String supervisionObjectName;
    /**
     * 监测内容
     **/
    private String supervisionRecordContent;
    /**
     * 提交时间
     **/
    private Date submitTime;
    /**
     * 其它信息
     **/
    private String otherMsg;
    /**
     * 其他提示
     **/
    private String otherTip;
    private Date updateTime;
    private String updateUser;
    private String delFlag;

    @Id
    @Column(name = "Id")
    /*@GeneratedValue(generator = "idGenerator")
    @GenericGenerator(name = "idGenerator", strategy = "com.css.dzj.dzjdzqs.common.util.SnowflakeId")*/
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "Create_User")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "Create_User_Unit")
    public String getCreateUserUnit() {
        return createUserUnit;
    }

    public void setCreateUserUnit(String createUserUnit) {
        this.createUserUnit = createUserUnit;
    }

    @Basic
    @Column(name = "Status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "Create_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "Supervision_Object_Name")
    public String getSupervisionObjectName() {
        return supervisionObjectName;
    }

    public void setSupervisionObjectName(String supervisionObjectName) {
        this.supervisionObjectName = supervisionObjectName;
    }

    @Basic
    @Column(name = "Supervision_Record_Content")
    public String getSupervisionRecordContent() {
        return supervisionRecordContent;
    }

    public void setSupervisionRecordContent(String supervisionRecordContent) {
        this.supervisionRecordContent = supervisionRecordContent;
    }

    @Basic
    @Column(name = "Submit_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    @Basic
    @Column(name = "Other_Msg")
    public String getOtherMsg() {
        return otherMsg;
    }

    public void setOtherMsg(String otherMsg) {
        this.otherMsg = otherMsg;
    }

    @Basic
    @Column(name = "Other_Tip")
    public String getOtherTip() {
        return otherTip;
    }

    public void setOtherTip(String otherTip) {
        this.otherTip = otherTip;
    }

    @Basic
    @Column(name = "Update_Time")
    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "Update_User")
    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    @Basic
    @Column(name = "del_Flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SupervisionEntity that = (SupervisionEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(title, that.title) &&
                Objects.equals(createUser, that.createUser) &&
                Objects.equals(createUserUnit, that.createUserUnit) &&
                Objects.equals(supervisionRecordContent, that.supervisionRecordContent) &&
                Objects.equals(status, that.status) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(supervisionObjectName, that.supervisionObjectName) &&
                Objects.equals(submitTime, that.submitTime) &&
                Objects.equals(otherMsg, that.otherMsg) &&
                Objects.equals(otherTip, that.otherTip) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updateUser, that.updateUser) &&
                Objects.equals(delFlag, that.delFlag);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, createUser, createUserUnit, supervisionRecordContent, status, createTime, supervisionObjectName, submitTime, otherMsg, otherTip, updateTime, updateUser, delFlag);
    }
}
